#pragma once
#include <string>
#include <functional>

// 事件回调接口定义
class EventCallback {
public:
    virtual ~EventCallback() = default;

    // 下载事件
    virtual void OnDownloadStart(const std::string &url) = 0;
    virtual void OnDownloadProgress(const std::string &url, size_t downloaded, size_t total) = 0;
    virtual void OnDownloadComplete(const std::string &url) = 0;
    virtual void OnDownloadError(const std::string &url, const std::string &error) = 0;

    // 播放事件
    virtual void OnPlayStart(const std::string &url) = 0;
    virtual void OnPlayPause() = 0;
    virtual void OnPlayResume() = 0;
    virtual void OnPlayStop() = 0;
    virtual void OnPlayFinished(const std::string &url) = 0;
    virtual void OnPlayError(const std::string &error) = 0;
};

// 函数指针版本回调（可选）
using CallbackFunc = std::function<void(const std::string &, int, int)>;